PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

Text

You can use the class identifier Text as a synonym for the identifier String--for example, in coercions:

"A string" as string = "A string" as text --result: true

However, the class of a string is always string :

set myThing to "A string"
class of myThing --result: string
set otherThing to myThing as text
class of otherThing --result: string

Unlike the class identifier Number (which is a synonym for either Real or Integer) or Styled Text (which denotes a string that includes font and style information), the class identifier Text is precisely equivalent to a single class identifier--String.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)